package cc.javaee.bbs.dao.activity;

import cc.javaee.bbs.dao.BaseDao;
import cc.javaee.bbs.model.activity.KbrActivityFile;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class ActivityFileDao extends BaseDao {
    //	String ns="kbr_activity_file.";
    String ns = "";

    public List<KbrActivityFile> find(KbrActivityFile KbrActivityFile) {
        List<KbrActivityFile> list = this.getSqlSession().selectList(ns + "find", KbrActivityFile);
        if (list != null && list.size() > 0) {
            for (KbrActivityFile act : list) {
            }
        }
        return list;
    }

    public List<KbrActivityFile> selectList(KbrActivityFile KbrActivityFile) {
        List<KbrActivityFile> list = this.getSqlSession().selectList(ns + "selectList", KbrActivityFile);
        if (list != null && list.size() > 0) {
            for (KbrActivityFile act : list) {
            }
        }
        return list;
    }

    public void insert(KbrActivityFile KbrActivityFile) {
        this.getSqlSession().insert(ns + "insert2", KbrActivityFile);
    }

    public void deleteByActId(Integer actId) {
        this.getSqlSession().delete(ns + "deleteFileByActId", actId);
    }

    public List<KbrActivityFile> findAct(Long actId) {
        return this.getSqlSession().selectList(ns + "findAct", actId);
    }

    public List<KbrActivityFile> findAd(Long actId) {
        return this.getSqlSession().selectList(ns + "findAd", actId);
    }
}
